package com.all.jasypt.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 菜单
 * @author ly
 * @since 2023-12-21
 */
@TableName("cms_sys_permission")
public class CmsSysPermission implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "permsId", type = IdType.AUTO)
    private Integer permsId;

    private String permsName;

    private Integer parentId;

    private String permsKey;

    private String permsType;

    private String permsUrl;

    private Integer permsLevel;

    private String permsIcon;

    private Integer available;

    private String description;

    private LocalDateTime createTime;

    private Byte isActive;

    private Byte projectType;

    private Byte isInit;

    private String menuType;

    // mybatis-plus 当前属性不是数据库的字段，但在项目中必须使用
    @TableField(exist = false)
    private List<CmsSysPermission> children;

    public List<CmsSysPermission> getChildren() {
        return children;
    }

    public void setChildren(List<CmsSysPermission> children) {
        this.children = children;
    }

    public Integer getPermsId() {
        return permsId;
    }

    public void setPermsId(Integer permsId) {
        this.permsId = permsId;
    }

    public String getPermsName() {
        return permsName;
    }

    public void setPermsName(String permsName) {
        this.permsName = permsName;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getPermsKey() {
        return permsKey;
    }

    public void setPermsKey(String permsKey) {
        this.permsKey = permsKey;
    }

    public String getPermsType() {
        return permsType;
    }

    public void setPermsType(String permsType) {
        this.permsType = permsType;
    }

    public String getPermsUrl() {
        return permsUrl;
    }

    public void setPermsUrl(String permsUrl) {
        this.permsUrl = permsUrl;
    }

    public Integer getPermsLevel() {
        return permsLevel;
    }

    public void setPermsLevel(Integer permsLevel) {
        this.permsLevel = permsLevel;
    }

    public String getPermsIcon() {
        return permsIcon;
    }

    public void setPermsIcon(String permsIcon) {
        this.permsIcon = permsIcon;
    }

    public Integer getAvailable() {
        return available;
    }

    public void setAvailable(Integer available) {
        this.available = available;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public Byte getIsActive() {
        return isActive;
    }

    public void setIsActive(Byte isActive) {
        this.isActive = isActive;
    }

    public Byte getProjectType() {
        return projectType;
    }

    public void setProjectType(Byte projectType) {
        this.projectType = projectType;
    }

    public Byte getIsInit() {
        return isInit;
    }

    public void setIsInit(Byte isInit) {
        this.isInit = isInit;
    }

    public String getMenuType() {
        return menuType;
    }

    public void setMenuType(String menuType) {
        this.menuType = menuType;
    }

    @Override
    public String toString() {
        return "CmsSysPermission{" +
            "permsId = " + permsId +
            ", permsName = " + permsName +
            ", parentId = " + parentId +
            ", permsKey = " + permsKey +
            ", permsType = " + permsType +
            ", permsUrl = " + permsUrl +
            ", permsLevel = " + permsLevel +
            ", permsIcon = " + permsIcon +
            ", available = " + available +
            ", description = " + description +
            ", createTime = " + createTime +
            ", isActive = " + isActive +
            ", projectType = " + projectType +
            ", isInit = " + isInit +
            ", menuType = " + menuType +
        "}";
    }
}
